package lab02.Test34;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2017/11/19.
 */
public class Test {
    public static void main(String[] args) {
        List<String> list = new ArrayList<String>();
        list.add("apple");
        list.add("grape");
        list.add("banana");
        list.add("pear");
        Object[] s = list.toArray();
        System.out.println("最小数是" + s[0]);
        System.out.println("最大数是" + s[s.length - 1]);
        for (Object o : s) {
            System.out.println(o);
        }
    }
}


